<h1><%= t('.title') %></h1>

<table class="table table-striped">
  <tr>
    <th><%= t('.name') %></th>
    <th><%= t('.description') %></th>
    <th><%= t('.image') %></th>
    <th><%= t('.price') %></th>
    <th></th>
  </tr>

<% @products.each do |product| %>
  <tr>
    <td><%= product.title %></td>
    <td><%= product.description %></td>
    <td><img src="<%= product.image %>" style="width: 100px;" /></td>
    <td><%= number_to_currency(product.price, :unit => 'CHF') %></td>
    <td>
    	<div class="btn-group">
	    	<%= link_to t('global_button_show'), product, :class => 'btn' %>
	    	<%= link_to t('global_button_edit'), edit_product_path(product), :class => 'btn' %>
	    	<%= link_to t('global_button_delete'), product, confirm: 'Are you sure?', :class => 'btn', method: :delete %>
    	</div>
    </td>
  </tr>
<% end %>
</table>

<br />

<%= link_to t('global_button_new'), new_product_path, :class => 'btn' %>
